@echo ===================================================
@echo ===================================================
@echo =========== LACONIC ERP EXPORT DATABASE ===========
@echo ===================================================
@echo ===================================================
@echo ================ Please wait...... ================
@echo ===================================================
@echo ===================================================

@ECHO ==========================================
@ECHO = Editted from:                          =
@ECHO = Oracle DB Auto Backup Program          =
@ECHO = Creator : Jim Lu(kirpheaice@gmail.com) =
@ECHO ==========================================

@echo off

@set DATABASE=LACONIC
@set ORG_NAME=LACONIC

For /f "tokens=1-4 delims=/- " %%a in ('date /t') do (set mydate=%%d_%%b%%c)
For /f "tokens=1-2 delims=/: " %%a in ("%TIME%") do (set mytime=%%a%%b)

> usermessage.vbs ECHO WScript.Echo InputBox( "Please enter target database... ", "TNS Name", "LACONIC" )
FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo usermessage.vbs') DO SET DATABASE=%%A
ECHO DATABASE=%DATABASE%
DEL usermessage.vbs

> usermessage.vbs ECHO WScript.Echo InputBox( "Please enter customer orginzation name... ", "Customer Name", "LACONIC" )
FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo usermessage.vbs') DO SET ORG_NAME=%%A
ECHO ORG_NAME=%ORG_NAME%
DEL usermessage.vbs

@ECHO ==================
@ECHO = Backup %ORG_NAME% =
@ECHO ==================
@set filename=%ORG_NAME%_%mydate%_%mytime%
@ECHO %filename%
@exp LACONIC/LACONIC@%DATABASE% file=%filename%.dmp

@ECHO =================
@ECHO = AUTO COMPRESS =
@ECHO =================
rar a -df %filename% %filename%.dmp

pause
